export function login(data) {
  /*
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data
  })*/
  return new Promise((resolve, reject) => {
    resolve(
      {
        code: '200',
        data: {
          token: 'admin-token'
        }
      }
    )
  })
}

export function getInfo(token) {
  /*
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })*/
  return new Promise((resolve, reject) => {
    resolve(
      {
        code: '200',
        data: {
          roles: ['admin'],
          introduction: 'I am a super administrator',
          avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
          name: 'Super Admin'
        }
      }
    )
  })
}

export function logout() {
  /*
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })*/
  return new Promise(
    (resolve, reject) => {
      resolve(
        {
          code: '200',
          data: 'success'
        }
      )
    }
  )
}
